[SYCL] Implement sycl_khr_queue_flush (old version, closed PR)#22158
[SYCL] Implement sycl_khr_queue_flush (old version, closed PR)#22158HPS-1 wants to merge 5 commits into
Conversation
Signed-off-by: Hu, Peisen <peisen.hu@intel.com>
Signed-off-by: Hu, Peisen <peisen.hu@intel.com>
Signed-off-by: Hu, Peisen <peisen.hu@intel.com>
Signed-off-by: Hu, Peisen <peisen.hu@intel.com>
Signed-off-by: Hu, Peisen <peisen.hu@intel.com>
|
Please also updated this README.md file to include "sycl_khr_queue_flush" in the list of supported KHR extensions. The order of the extensions should match the order in Appendix F of the SYCL 2020 specification, so add "sycl_khr_queue_flush" after "sycl_khr_group_interface" and before "sycl_khr_work_item_queries". |
|
Hey, I've created a fix for the opencl adapter |
Thanks a lot for fixing it! (Also just to confirm you actually meant this PR #22202 right?) And yes I agree it would be better if we can just use the existing |
|
FYI I'm creating a new PR #22214 for the new implementation using |
Implement
khr_flush()as per spec https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:khr-queue-flush, which essentially issues all command in the queue to the device without waiting for them to complete. It seems that there's an existing UR functionurQueueFlush()that achieves the "flushing" functionality, so I'm mostly reusing its code (in a new UR funcurKhrFlush(), and I'm not directly using it due to the issue stated below).However there's an issue that, for the OpenCL backend,


urQueueFlush()is callingclFinish()(wait for commands to complete spec here) instead ofclFlush()(doesn't wait for commands to complete spec here),despite it clearly says its analogue is
clFlush()in unified-runtime/source/loader/ur_libapi.cpp:So I changed it in
urKhrFlush()to callclFlush()instead. But not sure if it's a glitch or intended to useclFinish()forurQueueFlush(), can some reviewer from runtime kindly checks this out? If it's a glitch then I think we can just fix it and directly useurQueueFlush()for khr_flush()?